package com.hospital.hospitaldrugservice.web;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hospital.common.vo.ResultEntity;
import com.hospital.hospitaldrugservice.entity.Vender;
import com.hospital.hospitaldrugservice.service.IVenderService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 药品供货商表 前端控制器
 * </p>
 *
 * @author 王晓康
 * @since 2020-10-26
 */
@RestController
@RequestMapping("/vender")
public class VenderController {

    @Autowired
    private IVenderService venderService;

    @RequestMapping("/list")
    public ResultEntity venderList(){
        QueryWrapper<Vender> wrapper = new QueryWrapper<>();
        wrapper.eq("venderstatus_id",1);
        List<Vender> venderList = venderService.list(wrapper);
        return ResultEntity.ok(venderList);
    }

}
